<div class="popup_body">
    <div class="ui_table">
        <form method="post">
            <input type="hidden" name="agentId" value="${Session['SESSION_KEY_USER'].agentId}">
            <input type="hidden" name="imagePath" id="image_path_${pid}" value="${(entity.imagePath)!''}">
            <input type="hidden" name="id" value="${(entity.id)!''}">
            <table cellpadding="0" cellspacing="0">
                <tr>
                    <td width="70" align="right">分类名称：</td>
                    <td><input type="text" maxlength="20" name="categoryName" class="text easyui-validatebox"
                               required="true" value="${(entity.categoryName)!''}"/></td>

                    <td align="right">序号：</td>
                    <td><input class="text easyui-numberspinner" name="orderNum" required="true" data-options="min:0"
                               style="width: 184px; height: 28px;" value="${(entity.orderNum)!''}"/></td>
                <#--<td width="70" align="right" valign="top" rowspan="2" style="padding-top:10px;">图片：</td>-->
                <#--<td rowspan="2">-->
                <#--<div class="portrait">-->
                <#--<a href="javascript:void(0)"><img id="image_${pid}" src="<#if (entity.imagePath)?? && entity.imagePath?length gt 0>${controller.appConfig.staticUrl}/${(entity.imagePath)!''}<#else>${app.imagePath}/default_item_category.png</#if>" /><span>上传图片</span></a>-->
                <#--</div>-->
                <#--</td>-->
                </tr>
            <#--<tr>-->
            <#--<td align="right">上级分类：</td>-->
            <#--<td>-->
            <#--<select name="parentId" id="parent_id_${pid}" class="easyui-combotree" readonly  required="true"  style="width: 184px; height: 28px;"-->
            <#--data-options="-->
            <#--url:'${contextPath}/security/hdw/item_category/tree.htm?agentId=${Session['SESSION_KEY_USER'].agentId}&dummy=${'无'?url}',-->
            <#--onLoadSuccess:function() {-->
            <#--$('#parent_id_${pid}').combotree('setValue', '${(entity.parentId)!'0'}');-->
            <#--}" value="${(entity.parentId)!'0'}">-->
            <#--</td>-->
            <#--</tr>-->
                <tr>
                    <td align="right">备注：</td>
                    <td><input type="text" maxlength="40" name="memo" class="text easyui-validatebox"
                               value="${(entity.memo)!''}"/></td>
                </tr>
            </table>
        </form>
    </div>
</div>
<div class="popup_btn">
    <button class="btn btn_red ok">确定</button>
    <button class="btn btn_border close">关闭</button>
</div>
<script>
    function upload_image_callback(param) {
        $('#image_${pid}').attr('src', '${controller.appConfig.staticUrl}' + param.filePath);
        $('#image_path_${pid}').val(param.filePath);
        $('#' + param.pid).window('close');
    }
    (function () {
        var pid = '${pid}',
                win = $('#' + pid),
                form = win.find('form');

        win.find('button.ok').click(function () {
            form.form('submit', {
                url: '${contextPath}/security/hdw/item_category/update.htm',
                success: function (text) {
                    var json = $.evalJSON(text);
                <@app.json_jump/>
                    if (json.success) {
                        $.messager.alert('提示信息', '操作成功', 'info');
                        win.window('close');
                    } else {
                        $.messager.alert('提示信息', json.message, 'info');
                    }
                }
            });
        });
        win.find('button.close').click(function () {
            win.window('close');
        });
        win.find('.portrait').click(function () {
            App.dialog.show({
                css: 'width:558px;height:150px;overflow:visible;',
                title: '上传图片',
                href: "${contextPath}/security/hdw/item_category/image.htm",
                event: {
                    onClose: function () {
                    }
                }
            });
        });

    })()
</script>